home *** CD-ROM | disk | FTP | other *** search
- on keyDown
- global gDirty
- set gDirty to 1
- put the key && charToNum(the key)
- if the key = TAB then
- if validatePDCScreen() then
- if the machineType = 256 then
- set the editableText of sprite 19 to 1
- hilite field "meals"
- else
- pass()
- end if
- end if
- else
- if the key = BACKSPACE then
- pass()
- else
- if (charToNum(the key) > charToNum("9")) or (charToNum(the key) < charToNum("0")) then
- dontPassEvent()
- else
- if (charToNum(the key) <= charToNum("9")) or (charToNum(the key) >= charToNum("0")) then
- pass()
- end if
- end if
- end if
- end if
- end
-
- on keyUp
- global calcdata
- set DDC to integer(field "calories")
- setaProp(calcdata, #desired_calories, DDC)
- pass()
- end
-